import { IsNotEmpty, IsString,Length } from 'class-validator'
export class CreateLoginDto {
  @IsNotEmpty() //验证是否为空
  @IsString() //是否为字符串
  @Length(4, 16, {
    message:"长度应为4到16个字符"
  })
  name: string

  @IsNotEmpty()
  age: number
}
